use macros::EnumFromDarling;

#[allow(unused)]
#[derive(Debug, EnumFromDarling)]
enum Direction<T> {
    Up(DirectionUp<T>),
    Down,
    Left(u32),
    Right { a: u32 },
}
#[allow(unused)]
#[derive(Debug)]
struct DirectionUp<T> {
    speed: T,
}

impl<T> DirectionUp<T> {
    fn new(speed: T) -> Self {
        Self { speed }
    }
}
fn main() {
    let up = DirectionUp::new(12);
    let direction: Direction<i32> = up.into();
    let left = 16_u32;

    println!("{:?}", direction);
    let direction: Direction<u32> = left.into();
    println!("{:?}", direction);
}
